const fs = require('fs');
const path = require('path');

var filePath = path.join(__dirname, './folders/test')
var parentPath = path.join(__dirname, '/folders');

if (!fs.existsSync(filePath)) {
    fs.mkdirSync(filePath)
}

var files = fs.readdirSync(parentPath);
console.log(files);

fs.rmdirSync(parentPath);